package com.qf.config;

import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.RequestOriginParser;
import org.springframework.context.annotation.Configuration;

import javax.servlet.http.HttpServletRequest;

/**
 * @author 千锋教育
 * @Company http://www.mobiletrain.org/
 * @Version 1.0
 */
@Configuration
public class BlackAndWhiteNamesConfig implements RequestOriginParser {
    @Override
    public String parseOrigin(HttpServletRequest request) {
        String ip = request.getRemoteAddr();
        return ip;
    }
}
